OfficeWebAppsAPI Methods
An object defining methods for the OfficeWebAppsAPI class.
GetActionUrl(fileSecret, action, extension, cancellationToken, telemetryCollectorHolder)
Retrieves the action URL for an Office Web App, based on parameters such as the file secret, action type, and file extension.
Parameters:
fileSecret (required): string
The secret key of the file for which the action URL is being requested.
action (required): string
The specific action to be performed on the file, such as "view" or "edit."
extension (required): string
The file extension, specifying the type of file (e.g.,.docx
,.xlsx
) for the requested Office Web App action.
cancellationToken (optional): CancellationToken
A cancellation token to observe while waiting for the task to complete. Defaults todefault
if not provided.
telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data for tracking and diagnostics during the URL retrieval process. Defaults tonull
if not provided, used for advanced telemetry purposes.
Returns:
Type: Task<GetActionUrlResponse>
Returns url for opening document in office online viewer
This is a async method. Method should be waited. Be careful if call this method without waiting.
See Also
SetUrl(url)
Sets the API URL for requests.
Parameters:
url (required): string
The new API URL.
Returns:
Type: void
Method does not return anything
Exceptions:
Type: ArgumentNullException
ThrowsArgumentNullException
if URL is null or empty.
Type: Exception
ThrowsException
if the URL is invalid.
This is a sync method. Method runs synchronously.